import request from '@/utils/request'

export const CarParkFenceApi = {
    /**
     *  城市列表
     * @returns
     */
    getPage: (data) => {
        return request({
            url: '/manage/intercity/carParkFence/getPage',
            data,
            method: 'post'
        })
    },
    /**
     *  更新排序
     * @returns
     */
    updateSort: (data) => {
        return request({
            url: '/manage/intercity/carParkFence/updateSort',
            data,
            method: 'post'
        })
    },
    /**
     *  更新状态
     * @returns
     */
    updateStatus: (data) => {
        return request({
            url: '/manage/intercity/carParkFence/updateStatus',
            data,
            method: 'post'
        })
    },
    /**
     *  删除
     * @returns
     */
    delete: (fenceId) => {
        return request({
            url: '/manage/intercity/carParkFence/delete',
            params: {fenceId},
            method: 'get'
        })
    },

    /**
     *  获取详细信息
     * @returns
     */
    getInfoById: (params) => {
        return request({
            url: '/manage/intercity/carParkFence/getInfoById',
            data: params,
            method: 'get'
        })
    },

    /**
     *  更新
     * @returns
     */
    update: (data) => {
        return request({
            url: '/manage/intercity/carParkFence/update',
            data,
            method: 'post'
        })
    },

    /**
     *  插入
     * @returns
     */
    insert: (data) => {
        return request({
            url: '/manage/intercity/carParkFence/insert',
            data,
            method: 'post'
        })
    },

    /**
     *  批量更新围栏坐标
     * @returns
     */
    batchUpdate: (data) => {
        return request({
            url: '/manage/intercity/carParkFence/batchUpdate',
            data,
            method: 'post'
        })
    },

    /**
     *  查询围栏列表
     * @returns
     */
    getList: () => {
        return request({
            url: '/manage/intercity/carParkFence/getList',
            method: 'get'
        })
    },

    /**
     *  判断是否在围栏内
     * @returns
     */
    inPolygon: (data) => {
        return request({
            url: '/manage/intercity/carParkFence/inPolygon',
            data,
            method: 'post'
        })
    }
}
